/**
 * 
 */
package cc.dogtailflower.framework.bean;

import java.util.HashMap;
import java.util.Map;

/**
 * servlet返回 视图类型
 * @author cc
 *
 */
public class View {

	/*
	 * 视图路径
	 */
	private String viewPath;
	
	/*
	 * 模型数据
	 */
	private Map<String,Object> model;
	
	public View(String viewPath){
		this.viewPath = viewPath;
		this.model = new HashMap<String,Object>();
	}
	
	/*
	 * 为初始化的view对象添加模型数据
	 */
	public View addModel(String key,Object value){
		model.put(key, value);
		return this;
	}
	
	public String getViewPath(){
		return viewPath;
	}
	
	public Map<String,Object> getModel(){
		return model;
	}
}
